/**
 * @ author: 汪孟苹
 */
define(["jquery","bbcare","oms_config/root",
    "scprit/followup/app/datatable/datatable.ui.js",
    "scprit/followup/app/lostFollowupManager/periodPatient.servers.js"],
    function ($,$bb,$root,$datatableUi,$periodPatientServers) {
    var periodPatient = {};

    periodPatient.init = function(){
        $datatableUi.init({
            "id": "periodPatientList",
            "options": $periodPatientServers.getOptions()
        });
        /* 列的显示与隐藏 */
        var config = $root.init();
        if(!config.dom.lostFollowupRecordAge){
            $datatableUi.table.api().columns('.age').visible(false);
        }
        if(!config.dom.lostFollowupRecordGestation){
            $datatableUi.table.api().columns('.pregnancyWeek').visible(false);
        }
        if(!config.dom.lostFollowupRecordBirthday){
            $datatableUi.table.api().columns('.birthday').visible(false);
        }
        if(!config.dom.lostFollowupRecordWarn){
            $datatableUi.table.api().columns('.operation').visible(false);
        }
    }

    return periodPatient;
});